.class Lcom/baidu/o;
.super Ljava/lang/Object;


# static fields
.field private static a:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Lcom/baidu/t;",
            "Lcom/baidu/o;",
            ">;"
        }
    .end annotation
.end field


# instance fields
.field private b:Lcom/baidu/q;

.field private c:Ljava/util/Vector;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Vector",
            "<",
            "Lcom/baidu/Ad;",
            ">;"
        }
    .end annotation
.end field

.field private d:I

.field private e:Ljava/util/Timer;

.field private f:Z

.field private g:Lcom/baidu/t;


# direct methods
.method static constructor <clinit>()V
    .locals 6

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    sput-object v0, Lcom/baidu/o;->a:Ljava/util/Map;

    invoke-static {}, Lcom/baidu/t;->a()[Lcom/baidu/t;

    move-result-object v0

    array-length v1, v0

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v1, :cond_0

    aget-object v3, v0, v2

    sget-object v4, Lcom/baidu/o;->a:Ljava/util/Map;

    new-instance v5, Lcom/baidu/o;

    invoke-direct {v5, v3}, Lcom/baidu/o;-><init>(Lcom/baidu/t;)V

    invoke-interface {v4, v3, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_0
    return-void
.end method

.method private constructor <init>(Lcom/baidu/t;)V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-instance v0, Lcom/baidu/q;

    invoke-direct {v0, p0}, Lcom/baidu/q;-><init>(Lcom/baidu/o;)V

    iput-object v0, p0, Lcom/baidu/o;->b:Lcom/baidu/q;

    const/4 v0, 0x0

    iput v0, p0, Lcom/baidu/o;->d:I

    iput-object p1, p0, Lcom/baidu/o;->g:Lcom/baidu/t;

    return-void
.end method

.method public static a(Lcom/baidu/t;)Lcom/baidu/o;
    .locals 1

    sget-object v0, Lcom/baidu/o;->a:Ljava/util/Map;

    invoke-interface {v0, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/baidu/o;

    return-object p0
.end method

.method static synthetic a(Lcom/baidu/o;)Lcom/baidu/t;
    .locals 1

    iget-object v0, p0, Lcom/baidu/o;->g:Lcom/baidu/t;

    return-object v0
.end method

.method static synthetic a(Lcom/baidu/o;Z)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/baidu/o;->a(Z)V

    return-void
.end method

.method private a(Z)V
    .locals 0

    iput-boolean p1, p0, Lcom/baidu/o;->f:Z

    return-void
.end method

.method private a()Z
    .locals 1

    iget-boolean v0, p0, Lcom/baidu/o;->f:Z

    return v0
.end method

.method private b()Z
    .locals 1

    iget-object v0, p0, Lcom/baidu/o;->c:Ljava/util/Vector;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/baidu/o;->c:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->size()I

    move-result v0

    if-gtz v0, :cond_1

    :cond_0
    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method static synthetic b(Lcom/baidu/o;)Z
    .locals 1

    invoke-direct {p0}, Lcom/baidu/o;->b()Z

    move-result v0

    return v0
.end method


# virtual methods
.method public a(Landroid/content/Context;Ljava/lang/String;Lcom/baidu/s;)Lcom/baidu/Ad;
    .locals 9

    const/4 v8, 0x0

    const/4 v7, 0x1

    const/4 v6, 0x0

    invoke-direct {p0}, Lcom/baidu/o;->a()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-direct {p0, v6}, Lcom/baidu/o;->a(Z)V

    invoke-static {}, Lcom/baidu/c;->a()Lcom/baidu/c;

    move-result-object v0

    invoke-virtual {v0}, Lcom/baidu/c;->c()V

    iput-object v8, p0, Lcom/baidu/o;->c:Ljava/util/Vector;

    iput v6, p0, Lcom/baidu/o;->d:I

    :cond_0
    iget-object v0, p0, Lcom/baidu/o;->c:Ljava/util/Vector;

    if-nez v0, :cond_1

    invoke-static {}, Lcom/baidu/c;->a()Lcom/baidu/c;

    move-result-object v0

    iget-object v1, p0, Lcom/baidu/o;->g:Lcom/baidu/t;

    invoke-virtual {v0, v1}, Lcom/baidu/c;->a(Lcom/baidu/t;)Ljava/util/Vector;

    move-result-object v0

    iput-object v0, p0, Lcom/baidu/o;->c:Ljava/util/Vector;

    iput v6, p0, Lcom/baidu/o;->d:I

    :cond_1
    iget-object v0, p0, Lcom/baidu/o;->b:Lcom/baidu/q;

    invoke-virtual {v0, p1, p2, p3}, Lcom/baidu/q;->a(Landroid/content/Context;Ljava/lang/String;Lcom/baidu/s;)V

    iget-object v0, p0, Lcom/baidu/o;->e:Ljava/util/Timer;

    if-nez v0, :cond_2

    new-instance v0, Ljava/util/Timer;

    invoke-direct {v0}, Ljava/util/Timer;-><init>()V

    iput-object v0, p0, Lcom/baidu/o;->e:Ljava/util/Timer;

    iget-object v0, p0, Lcom/baidu/o;->e:Ljava/util/Timer;

    iget-object v1, p0, Lcom/baidu/o;->b:Lcom/baidu/q;

    const-wide/16 v2, 0x0

    const-wide/32 v4, 0x36ee80

    invoke-virtual/range {v0 .. v5}, Ljava/util/Timer;->schedule(Ljava/util/TimerTask;JJ)V

    :cond_2
    iget-object v0, p0, Lcom/baidu/o;->c:Ljava/util/Vector;

    if-eqz v0, :cond_3

    iget-object v0, p0, Lcom/baidu/o;->c:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->size()I

    move-result v0

    if-lez v0, :cond_3

    iget-object v0, p0, Lcom/baidu/o;->c:Ljava/util/Vector;

    iget v1, p0, Lcom/baidu/o;->d:I

    add-int/lit8 v2, v1, 0x1

    iput v2, p0, Lcom/baidu/o;->d:I

    iget-object v2, p0, Lcom/baidu/o;->c:Ljava/util/Vector;

    invoke-virtual {v2}, Ljava/util/Vector;->size()I

    move-result v2

    rem-int/2addr v1, v2

    invoke-virtual {v0, v1}, Ljava/util/Vector;->elementAt(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/baidu/Ad;

    const-string v1, "AdLoader.fetchAd"

    const-string v2, "[%d] %s"

    const/4 v3, 0x2

    new-array v3, v3, [Ljava/lang/Object;

    iget v4, p0, Lcom/baidu/o;->d:I

    sub-int/2addr v4, v7

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    aput-object v4, v3, v6

    invoke-virtual {v0}, Lcom/baidu/Ad;->toString()Ljava/lang/String;

    move-result-object v4

    aput-object v4, v3, v7

    invoke-static {v2, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/baidu/bk;->b(Ljava/lang/String;Ljava/lang/String;)I

    :goto_0
    return-object v0

    :cond_3
    move-object v0, v8

    goto :goto_0
.end method
